package com.wolf.etl.core.handler;

import com.alibaba.fastjson.JSONObject;
import com.wolf.etl.core.ETLManager;
import com.wolf.etl.model.EtlHandlerModel;

/**
 * 抽象处理方法
 *
 * api javascript 组合调用
 *
 *
 * @author sdyang
 *
 * @date 2019/11/23 10:41
 **/
public abstract class AbstractHandler {

    protected Long handler_id;

    protected EtlHandlerModel etlHander;

    protected AbstractHandler handler;

    protected ETLManager manager;

    public void setNextHandler(AbstractHandler handler) {
        this.handler = handler;
    }

    public abstract JSONObject done(JSONObject data);

    public EtlHandlerModel getEtlHander() {
        return etlHander;
    }

    public void setEtlHander(EtlHandlerModel etlHander) {
        this.etlHander = etlHander;
    }

    public Long getHandler_id() {
        return handler_id;
    }

    public void setHandler_id(Long handler_id) {
        this.handler_id = handler_id;
    }


    public ETLManager getManager() {
        return manager;
    }

    public void setManager(ETLManager manager) {
        this.manager = manager;
    }
}
